package com.desay.pangoo.itmt.config;

import org.springframework.core.convert.support.GenericConversionService;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.InitBinder;

/**
 * 
 * @Description： 参数时间预处理
 * 
 * @author uidq1163 on [2022年4月22日下午3:05:26]
 * @Modified By： [修改人] on [修改日期] for [修改说明]
 *
 */
@ControllerAdvice
public class TimeControllerHandler {
    @InitBinder
    public void initBinder(WebDataBinder binder) {
        GenericConversionService genericConversionService = (GenericConversionService) binder.getConversionService();
        if (genericConversionService != null) {
            genericConversionService.addConverter(new CourseDateConverter());
        }
    }
}
